package com.integration.gateway;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.annotation.BridgeFrom;
import org.springframework.integration.annotation.Poller;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

@Configuration
public class Config {

    @Bean
    @BridgeFrom(value = "coldDrinks", poller = @Poller(fixedDelay = "1000", maxMessagesPerPoll = "10"))
    public MessageChannel coldDrinkBarista() {
        return new DirectChannel();
    }

    @Bean
    @BridgeFrom(value = "hotDrinks", poller = @Poller(fixedDelay = "1000", maxMessagesPerPoll = "10"))
    public MessageChannel hotDrinkBarista() {
        return new DirectChannel();
    }
}
